import time
import random
import hashlib


def generate_ut_token():  # ut token生成
    """动态生成EastMoney的ut访问令牌"""
    timestamp = str(int(time.time() * 1000))
    rand_num = str(random.random())
    return hashlib.md5((timestamp + rand_num).encode()).hexdigest()
